Graphic objects and drawing elements > Property Panel > All properties and connections > Variable
From the list, select the type of variable to be inserted in the caption. In the dialog box, specify the details of the variable.